#pragma once
#include "CBaseapp.h"
#include "WarePrepare.h"
#include "WareEngineNameSpace.h"
#include "CAniRenderObj.h"

BEGIN_WARE
class ISprite;
class ISceneNodeTransform;
END_WARE

#define MAX_COUNT 10

using namespace Ware;

class CAniApp : public CBaseApp
{
public:
	CAniApp(void);
	~CAniApp(void);

	virtual VBOOL	CreateScene();
	virtual VBOOL	UpdateScene( uint32 uCurTime );
	virtual void	ReleaseScene();

	//////////////////////////////////////////////////////////////////////////
	VBOOL			SetAnimation( int32 nRace, int32 nJob, int32 nState, int32 nDir );
	void			SetAniPlaySpeed( float32 fPlaySpeed );

	float32			GetAniPerFrameTime();

	void			SetResPath( const string& strResPath );//	{ m_strResPath = strResPath; }
	//void			SetMoveType( int32 nMoveType )	{ m_nMoveType = nMoveType; }
	//int32			GetMoveType()					{ return m_nMoveType; }
	void			CreateAniObj( const VCHAR* szAniFileName );

	CAniRenderObj*	GetCurrentObj() { return m_pObj; }

	VBOOL			SaveCurAnimation( const VCHAR* szAniFileName );

private:
	string			m_strResPath;

	uint32			m_uSceneID;

	VBOOL			m_bRun;
	uint32			m_uRunStartTime;

	CAniRenderObj*	m_pObj;

	string			m_strCurAnimationFile;

};
